
import request from '@/utils/request'

export function PostresetPass(oldPassword,newPassword) {

    return request({
        url: '/account/resetPass',
        method: 'post',
        data:{oldPassword:oldPassword,
            newPassword:newPassword},
        headers: {}
    })
}


export function PostchangeMail(email) {

    return request({
        url: '/account/email'+'?email='+email,
        method: 'put',
        data:{},
        headers: {}
    })
}

//更换头像
export function changeUserAvatar(fd){
    return request({
        url: '/account/avatar',
        method: 'put',
        data:fd,
        headers: {'Content-Type': 'multipart/form-data'}
    })
}



// /account/getNotifications params接收page和size
export function getNotifications(page,size) {

    return request({
        url: '/account/getNotifications?page='+page+'&size='+size,
        method: 'get',
        data:{},
        headers: {}
    })
}